import request from '@/utils/request'

export default {
	
	//讲师列表(条件查询 分页)
	getChaptersByCourseId(courseId) {
		return request({
			url: `/edu/content/chapter/${courseId}`,
			method: 'get'
		})
	},
	//添加章节
	addChapter(chapter) {
		return request({
			url: `/edu/content/chapter`,
			method: 'post',
			data:chapter
		})
	},
	//删除章节
	deleteChapter(chapterId) {
		return request({
			url: `/edu/content/chapter/${chapterId}`,
			method: 'delete'
		})
	},
	//更新章节
	updateChapter(chapter) {
		return request({
			url: `/edu/content/chapter`,
			method: 'put',
			data:chapter
		})
	},
	//获得章节信息
	getChapter(chapterId){
		return request({
			url: `/edu/content/chapter?chapterId=${chapterId}`,
			method: 'get'
		})
	},
	
	getChaptersOnly(courseId){
		return request({
			url: `/edu/content/chapter/getChapter/${courseId}`,
			method: 'get'
		})
	}
	
	
}